package com.ruoyi.book.domain;

import java.util.List;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Builder;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 书籍借阅对象 bs_borrow
 * 
 * @author yaohui
 * @date 2024-05-08
 */
@Setter
@Getter
@Builder
public class BorrowInfo extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 借阅者ID */
    @Excel(name = "借阅者ID")
    private Long userId;

    /** 书本编号 */
    @Excel(name = "书本编号")
    private String bookNum;

    /** 借阅日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "借阅日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date borrowDate;

    /** 归还日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "归还日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date returnDate;

    /** 截至日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "截至日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date closeDate;

    /** 归还状态 */
    @Excel(name = "归还状态")
    private String state;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("bookNum", getBookNum())
            .append("borrowDate", getBorrowDate())
            .append("returnDate", getReturnDate())
            .append("closeDate", getCloseDate())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
